package com.startup.yellocar.service.impl;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.startup.yellocar.dto.KittyDTO;
import com.startup.yellocar.dao.KittyDAO;

import com.startup.yellocar.service.KittyService;

@Service
@Transactional
public class KittyServiceImpl implements KittyService {

	@Autowired
	protected KittyDAO kittyDAO;

	@Transactional
	public void insert(KittyDTO kittyDTO){
		kittyDAO.insert(kittyDTO);
	}

	@Transactional
	public void update(KittyDTO kittyDTO){
		kittyDAO.update(kittyDTO);
	}

	@Transactional
	public KittyDTO get(int id) {
		return kittyDAO.get(id);
	}

	@Transactional
	public List<KittyDTO> getAll() {
		return kittyDAO.getAll();
	}

	@Transactional
	public void delete(KittyDTO kittyDTO){
		kittyDAO.delete(kittyDTO);
	}

}
